package com.littcore.saap.assistant.po;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import java.io.Serializable;

/**
 * <br>
 * Table:tag<br>
 * @author Hibernate Tools 3.4.0.CR1
 * @version 1.0
 * @since Jul 1, 2015 2:49:55 PM
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = true, dynamicInsert = true)
@Table(name = "tag")
public class Tag implements Serializable {
	/**
	 * UID
	 */
	private static final long serialVersionUID = 1L;
	/**
	 * 序号.
	 */
	private Integer id;

	/**
	 * 租户ID.
	 */
	private int tenantId;

	/**
	 * 模块编号.
	 */
	private String moduleCode;

	/**
	 * 名称.
	 */
	private String name;

	/**
	 * 样式.
	 */
	private String style;

	/**
	 * 是否用户自定义.
	 */
	private boolean userDefined;

	/**
	 * 创建时间.
	 */
	private Date createDatetime;

	public Tag() {
	}

	public Tag(int tenantId, String moduleCode, String name, String style,
			boolean userDefined, Date createDatetime) {
		this.tenantId = tenantId;
		this.moduleCode = moduleCode;
		this.name = name;
		this.style = style;
		this.userDefined = userDefined;
		this.createDatetime = createDatetime;
	}

	/**  
	 * Get 序号.
	 * @return 序号
	 */
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	/**
	 * Set 序号.
	 * @param id 序号
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**  
	 * Get 租户ID.
	 * @return 租户ID
	 */

	@Column(name = "TENANT_ID", nullable = false)
	public int getTenantId() {
		return this.tenantId;
	}

	/**
	 * Set 租户ID.
	 * @param tenantId 租户ID
	 */
	public void setTenantId(int tenantId) {
		this.tenantId = tenantId;
	}

	/**  
	 * Get 模块编号.
	 * @return 模块编号
	 */

	@Column(name = "MODULE_CODE", nullable = false, length = 50)
	public String getModuleCode() {
		return this.moduleCode;
	}

	/**
	 * Set 模块编号.
	 * @param moduleCode 模块编号
	 */
	public void setModuleCode(String moduleCode) {
		this.moduleCode = moduleCode;
	}

	/**  
	 * Get 名称.
	 * @return 名称
	 */

	@Column(name = "NAME", nullable = false, length = 20)
	public String getName() {
		return this.name;
	}

	/**
	 * Set 名称.
	 * @param name 名称
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**  
	 * Get 样式.
	 * @return 样式
	 */

	@Column(name = "STYLE", nullable = false, length = 200)
	public String getStyle() {
		return this.style;
	}

	/**
	 * Set 样式.
	 * @param style 样式
	 */
	public void setStyle(String style) {
		this.style = style;
	}

	/**  
	 * Get 是否用户自定义.
	 * @return 是否用户自定义
	 */

	@Column(name = "USER_DEFINED", nullable = false)
	public boolean isUserDefined() {
		return this.userDefined;
	}

	/**
	 * Set 是否用户自定义.
	 * @param userDefined 是否用户自定义
	 */
	public void setUserDefined(boolean userDefined) {
		this.userDefined = userDefined;
	}

	/**  
	 * Get 创建时间.
	 * @return 创建时间
	 */

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_DATETIME", nullable = false, length = 19)
	public Date getCreateDatetime() {
		return this.createDatetime;
	}

	/**
	 * Set 创建时间.
	 * @param createDatetime 创建时间
	 */
	public void setCreateDatetime(Date createDatetime) {
		this.createDatetime = createDatetime;
	}

}
